	function readData (filename, callback) {
		var filePath = "/mnt/sdcard/" + filename;

		var readInData = function () {
			var fr = new FileReader();
			fr.onload = function (data) {
				callback(data);
			};
			fr.readAsText(filePath);
		}		

		navigator.fileMgr.testFileExists(filePath, function(exists) {
			exists ? readInData() : alert("file doesn't exist");
		});
	}
	
	//Navigation Functions
	
	function main(){
		location.href = 'main.html';
	}
	
	function index(){
		location.href = 'index.html';
	}